home *** CD-ROM | disk | FTP | other *** search
- /* Manual */
-
- options results
- parse ARG Port Ptr M0 M1 M2 M3 M4 M5 M6 b
-
- ADDRESS value Port
-
- pp_GetWidth
- W=result;W2=W/2-1
-
- if W=0 then EXIT
-
- pp_GetHeight
- H=result;H2=H/2-1
-
- IF Ptr=1|Ptr=2 then DO
- IF M0=1|M0=2 THEN DO
- X=M1;Y=M2;R=M3
- END
- ELSE
- DO
- X=W2
- Y=H2
- IF W>H THEN DO
- R=H2
- END
- ELSE
- DO
- R=W2
- END
- END
-
- pp_DialogInit 150 100 "*Circle*" 3
- pp_Integer 0 60 5 50 16 "X" 1 X
- pp_Integer 1 60 25 50 16 "Y" 1 Y
- pp_Integer 2 60 50 50 16 "Radius" 1 R
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- R=result
-
- if Ptr=1 then DO
- pp_Circle X Y R
- END
- ELSE
- DO
- pp_CircleF X Y R
- END
- END
-
- IF Ptr=12|Ptr=13 then DO
- IF M0=12|M0=13 THEN DO
- X=M1;Y=M2;R=M3;R2=M4
- END
- ELSE
- DO
- X=W2
- Y=H2
- R=W2
- R2=H2
- END
-
- pp_DialogInit 150 125 "*Ellipse*" 4
- pp_Integer 0 60 5 50 16 "X" 1 X
- pp_Integer 1 60 25 50 16 "Y" 1 Y
- pp_Integer 2 60 50 50 16 "RadiusX" 1 R
- pp_Integer 3 60 70 50 16 "RadiusY" 1 R2
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- R=result
-
- pp_GetDialog 3
- R2=result
-
- if Ptr=12 then DO
- pp_Ellipse X Y R R2
- END
- ELSE
- DO
- pp_EllipseF X Y R R2
- END
- END
-
- IF Ptr=3|Ptr=4 then DO
- IF M0=3|M0=4 THEN DO
- X=M1;Y=M2;XX=M3;YY=M4
- END
- ELSE
- DO
- X=0
- Y=0
- XX=W-1
- YY=H-1
- END
-
- pp_DialogInit 150 125 "*Box*" 4
- pp_Integer 0 60 5 50 16 "Start*X" 1 X
- pp_Integer 1 60 25 50 16 "Start*Y" 1 Y
- pp_Integer 2 60 50 50 16 "End*X" 1 XX
- pp_Integer 3 60 70 50 16 "End*Y" 1 YY
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- XX=result
-
- pp_GetDialog 3
- YY=result
-
- if Ptr=3 then DO
- pp_Box X Y XX YY
- END
- ELSE
- DO
- pp_BoxF X Y XX YY
- END
- END
-
- IF Ptr=6|Ptr=7 then DO
- IF M0=6|M0=7 THEN DO
- X=M1;Y=M2;XX=M3;YY=M4;XXX=M5;YYY=M6
- END
- ELSE
- DO
- X=0
- Y=0
- XX=W-1
- YY=0
- XXX=W2
- YYY=H-1
- END
-
- pp_DialogInit 150 175 "*Spline*" 6
- pp_Integer 0 60 5 50 16 "Start*X" 1 X
- pp_Integer 1 60 25 50 16 "Start*Y" 1 Y
- pp_Integer 2 60 50 50 16 "End*X" 1 XX
- pp_Integer 3 60 70 50 16 "End*Y" 1 YY
- pp_Integer 4 60 95 50 16 "MX" 1 XXX
- pp_Integer 5 60 115 50 16 "MY" 1 YYY
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- XX=result
-
- pp_GetDialog 3
- YY=result
-
- pp_GetDialog 4
- XXX=result
-
- pp_GetDialog 5
- YYY=result
-
- if Ptr=6 then DO
- pp_Spline X Y XX YY XXX YYY
- END
- ELSE
- DO
- pp_SplineF X Y XX YY XXX YYY
- END
- END
-
- IF Ptr=5 then DO
- IF M0=5 THEN DO
- X=M1;Y=M2;XX=M3;YY=M4
- END
- ELSE
- DO
- X=0
- Y=0
- XX=W-1
- YY=H-1
- END
-
- pp_DialogInit 150 125 "*Line*" 4
- pp_Integer 0 60 5 50 16 "Start*X" 1 X
- pp_Integer 1 60 25 50 16 "Start*Y" 1 Y
- pp_Integer 2 60 50 50 16 "End*X" 1 XX
- pp_Integer 3 60 70 50 16 "End*Y" 1 YY
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- XX=result
-
- pp_GetDialog 3
- YY=result
-
- pp_Line X Y XX YY
- END